#include <stdio.h>
typedef unsigned char *byte_pointer;

void show_bytes(byte_pointer start, int len){
    int i;\
    printf("[show bytes():] 0x");
    for(i = 0; i < len; i++){
        printf("%.2x ", start[i]);
    }
    printf("\n");
}

signed int main(){
    short int a = -12345;
    unsigned short int b = (unsigned short) a;
    printf("a = %d, b = %u", a, b);

    show_bytes((byte_pointer)&a, sizeof(short int));
    show_bytes((byte_pointer)&b, sizeof(short int));
}